﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common;
using DataAccess;

namespace BusinessLogic
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "FaultWCF" in code, svc and config file together.
    public class FaultWCF : IFaultWCF
    {
        public void AddToFaults(Fault f)
        {
            new FaultRepository().AddToFaults(f);
        }

        public IEnumerable<Fault> GetAllFaults()
        {
            return new FaultRepository().GetAllFaults();
        }

        public FaultStatu GetFaultStatus(int statusID)
        {
            return new FaultRepository().GetFaultStatus(statusID);
        }

        public IEnumerable<FaultStatu> GetAllFaultStatus()
        {
            return new FaultRepository().GetAllFaultStatus();
        }

        public IEnumerable<CategoryFault> GetCategoryFault()
        {
            return new FaultRepository().GetCategoryFault();
        }

        public Fault GetFaultByID(int id)
        {
            return new FaultRepository().GetFaultByID(id);
        }

        public void UpdateFault(Fault f)
        {
            new FaultRepository().UpdateFault(f);
        }
    }
}
